// math.c
int power(int base, int exp)
{
  if(exp < 0)
  {
    return -1;
  }
  while(exp > 0)
  {
    base *= base;
  }
  return base;
}